//For this example, set DataType to "int" in listarr.h
#include <iostream>
#include "list.h"
using namespace std;
void main(){
	List samples(100);//Set of samples
	int x,//Input sample
	total=0;//Sum of the Input samples
	//Read in a set of samples from the keyboard.
	char c;
	bool run=true;
	//cout<<"Enter list of samples (end with eof):";
	while(run){
		cin>>c;
		switch(c){
		case'+':
			cin>>x;
			samples.insert(x);
			samples.showStructure();
			break;
		case'-':
			samples.remove();
			samples.showStructure();
			break;
		case'=':
			cin>>x;
			samples.replace(x);
			samples.showStructure();
			break;
		case'@':
			cout<<samples.getCursor();
			samples.showStructure();
			break;
		case'N':
			cout<<"test gotoNext()"<<endl;
			samples.gotoNext();
			samples.showStructure();
			break;
		case'P':
			cout<<"test gotoPrior()"<<endl;
			samples.gotoPrior();
			samples.showStructure();
			break;
		case'<':
			cout<<"test gotoBeginning()"<<endl;
			samples.gotoBeginning();
			samples.showStructure();
			break;
		case'>':
			cout<<"test gotoEnd()"<<endl;
			samples.gotoEnd();
			samples.showStructure();
			break;
		case'E':
			cout<<"test isEmpty()=";
			cout<<samples.isEmpty()<<endl;
			samples.showStructure();
			break;
		case'F':
			cout<<"test isFull()="<<endl;
			cout<<samples.isFull()<<endl;
			samples.showStructure();
			break;
		case'C':
			cout<<"is clearing list."<<endl;
			samples.clear();
			samples.showStructure();
			break;
		case'Q':
			run=false;
			break;
		}
	}
	system("pause");
}